@section('title') 用户注册 @parent @show @section('headEnd')

@show @section('content')
{{ HTML::script('js/index/register.js') }}
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=3443617967" type="text/javascript" charset="utf-8"></script>
<form id="registration" autocomplete="off" class="form-register deform" method="post" action="{{ route('home.register') }}">
	<div class="loginPublic">
		 <p class="top-title">创建新账号</p>
		<p id="default-tip" class="default-tip"></p>
		<p class="error-tip"></p>
		<input id="isphoemil" class="isphoemil" type="hidden" name="account_type" value="phone" />
		<div class="">
			<input id="rusername" class="itxt username" name="username"  type="text" placeholder="手机号" onfocus="this.placeholder=''" onblur="this.placeholder='手机号'">
		</div>

		<div>
			<input style="width:156px;" type="text" id="rcode" name="code" class="itxtcode rphonecode" autocomplete="off"  tabindex="11" maxlength="10" placeholder="图片验证码" onfocus="this.placeholder=''" onblur="this.placeholder='图片验证码'">
			 <span class="input-group-addon"><img id='code_img' src="/api/guest/reg-code/{{ mt_rand() }}"></span>
			 <span class="input-group-addon"><a onclick="regcodeUpdate()" href="javascript:;">点击刷新</a></span>
		</div>
				                                             
		<div>
			<input style="width:156px;" type="text" id="rphonecode" name="phonecode" class="itxtcode rphonecode" autocomplete="off"  tabindex="11" maxlength="10" placeholder="验证码" onfocus="this.placeholder=''" onblur="this.placeholder='验证码'">
			 <span href="{{ route('send_code') }}" id="phonecode" class="phonecode">获取验证码</span>
		</div>
		<div>
			<input type="password" id="rpassword"  name="password" class="itxt itxt-error password" placeholder="密码" onfocus="this.placeholder=''" onblur="this.placeholder='密码'">
		</div>
		<br>
		<div class="auth-reg-a">
			<botton type="botton" id="subRegister" class="subRegister1" style="cursor:pointer">创建账号</botton>
        </div>
        {{ Form::token() }}
		<div class="gongzhonghao">
			<div class="iconbox">
				<a class="qqcion" href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101302496&redirect_uri=http%3a%2f%2fwww.elvtuan.com%2foauth%2fgetUser&state=qq"></a>
				<a class="wxcion" href="https://open.weixin.qq.com/connect/qrconnect?appid=wx63d6fd4e6ab7880d&redirect_uri=http://www.elvtuan.com/oauth/getUser&response_type=code&scope=snsapi_login&state=wx"></a>
				
			</div>
		</div>
		<p>
			<span class="colorF">已创建账号? </span> 
	    	<a class="" href="{{ route('home.loginview') }}" style="color:#4ab4ff"> 立即登录</a>
		</p>
	</div>
</form>

<script type="text/javascript">
	var captcha = "{{ Route('home.captcha') }}";
	$(".lv-user").hide();
</script>
<!--  qq登录 -->
<script type="text/javascript">
	
	
	/***********************************************************************************
 	*  更换验证吗
 	*/
	function regcodeUpdate(){
		$("#code_img").attr("src", "/api/guest/reg-code/adfasd" + Math.random());
		return false;
	}
	
	
	
	
   //调用QC.Login方法，指定btnId参数将按钮绑定在容器节点中
   QC.Login({
       //btnId：插入按钮的节点id，必选
       btnId:"qqLogin",	
       //用户需要确认的scope授权项，可选，默认all
       scope:"all",
       //按钮尺寸，可用值[A_XL| A_L| A_M| A_S|  B_M| B_S| C_S]，可选，默认B_S
       size: "A_XL"
   }, function(reqData, opts){//登录成功
       //根据返回数据，更换按钮显示状态方法
       var dom = document.getElementById(opts['btnId']),
       _logoutTemplate=[
            //头像
            '<span><img src="{figureurl}" class="{size_key}"/></span>',
            //昵称
            '<span>{nickname}</span>',
            //退出
            '<span><a href="javascript:QC.Login.signOut();">退出</a></span>'	
                     ].join("");
       dom && (dom.innerHTML = QC.String.format(_logoutTemplate, {
           nickname : QC.String.escHTML(reqData.nickname),
           figureurl : reqData.figureurl
              }));
   }, function(opts){//注销成功
	alert('QQ登录 注销成功');
	                     }
);
</script>
@stop
